package cn.neusoft.service;

import cn.neusoft.domain.CargoDescription;
import cn.neusoft.domain.CargoVariety;
import org.springframework.stereotype.Service;

import java.util.List;
@Service

public interface CargoAndDescriptionService {
    public int cargoDesRegister(CargoDescription cargoDescription);
    public int varietyRegister(CargoVariety cargoVariety);
    public int varietyDelete(String varName);
    public int cargoDesDelete(String carName);
    public List<CargoDescription> getAllDes();
    public CargoVariety findVarHadDesName(String desName);
    public List<CargoVariety> getVarietyByLayers(int layer);
    public List<CargoDescription> getCargoDesByVarName(String varName);
    public List<String> getCargoDesNameByVarName(String varName);//若为空则全部root
    public int cargosToVariety(String desName, String varName);
    public CargoDescription getByDesName(String name);
    public int updateCargoDes(CargoDescription cargoDescription);//连带修改种类信息
    public int updateVariety(CargoVariety cargoVariety);
    public CargoVariety getVarietyByName(String varName);
    public List<CargoVariety> getVarietyRoot();
    public CargoVariety getVarietyByID(int id);
    public CargoDescription getDesByID(int id);
    public List<CargoVariety> GetParentVar(String varName);
}
